#!/usr/bin/python
# coding:utf-8

import msg.util_email
import msg.util_sms


def buy_remind_by_mail(fundcode, fundname, add_amount, receiver):
    mail_subject = "AFTR - BUY %s (%s)" % (fundname, fundcode)
    mail_content = "买入基金: " + fundname + "\n"
    mail_content += "买入金额: " + str(add_amount)
    msg.util_email.mail2(mail_subject, mail_content, [receiver])


def buy_remind_by_sms(fundcode, add_amount, mobile):
    sms_content = "【量化提醒】buy:" + fundcode + "，" + "amount:" + str(add_amount)
    msg.util_sms.send_sms(sms_content, mobile)


def sell_remind_by_mail(fundcode, fundname, sell_amount, receiver):
    mail_subject = "AFTR - SELL %s (%s)" % (fundname, fundcode)
    mail_content = "卖出基金: " + fundname + "\n"
    mail_content += "卖出份额: " + str(sell_amount)
    msg.util_email.mail2(mail_subject, mail_content, [receiver])


def sell_remind_by_sms(fundcode, sell_amount, mobile):
    sms_content = "【量化提醒】sell:" + fundcode+"，" + "amount:" + str(sell_amount)
    msg.util_sms.send_sms(sms_content, mobile)
